<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>项目款项详情-目的地运营集团数据管理平台</title>
<include file="Include:style" />
<include file="Include:javascript" />
<style>
    .hidden{ display: none; }
    .form_table td{ height: 24px; }
    .form_table .form_table_left{ min-width: 80px; }
    .form_table .form_table_left.active{ vertical-align: top; padding-top: 13px; }
    .form_table tr:last-child td{ border: none; }
    .form_label{ width: 80px; }
    .function{ position: relative; }
    .cut{ padding-top: 45px; }
</style>
</head>
<body style="background: #f3f3f3;">
<div class="header">
	<a class="back_btn" href="{$url}"></a>
    项目款项详情
</div>
<div class="content">
    <div class="meeting_cont">
        <div class="form_table all mb10 toptable">
            <table cellspacing="0">
                <tr>
                    <td class="form_table_left">项目编号</td>
                    <td class="form_table_right">{$result['project_num']}</td>
                </tr>
                <tr>
                    <td class="form_table_left">项目名称</td>
                    <td class="form_table_right"><div class="right_text">{$result['project_name']}</div></td>
                </tr>
                <tr>
                    <td class="form_table_left">所属中心</td>
                    <td class="form_table_right">{$result['center_name']}</td>
                </tr>
                <tr>
                    <td class="form_table_left">合同金额</td>
                    <td class="form_table_right">{$result['contract_money']}</td>
                </tr>
                <tr>
                    <td class="form_table_left">合同日期</td>
                    <td class="form_table_right">{$result['contract_date']}</td>
                </tr>
                <tr>
                    <td class="form_table_left">合同附件</td>
                    <td class="form_table_right"><div class="right_text"><a href="{$result['file_url']}" class="file">{$result['file_name']}</a></div></td>
                </tr>
                <tr>
                    <td class="form_table_left">添加人</td>
                    <td class="form_table_right">{$result['add_user']}({$result['add_date']|substr=0,10})</td>
                </tr>
            </table>
        </div>
        <div class="function">
            <div class="cut_menu_line abs">
                <a class="active" href="javascript:;" uid="{$vo['uid']}" mid="{$result['id']}">当前款项详情<img src="__PUBLIC__/mobile/images/index/arrow_top.png" alt=""><span></span></a><a href="javascript:;" uid="{$vo['uid']}" mid="{$result['id']}">全部款项阶段<img src="__PUBLIC__/mobile/images/index/arrow_top.png" alt=""><span></span></a>
            </div>
            <div class="cut">
                <div class="box">
                    <div class="finacial_det">
                        <div class="xm_list">
                            <if condition="$result['kp_total'] gt 0">
                                <foreach name="result['two']" item="v">
                                    <if condition="$type eq 1">
                                        <if condition="$v['kp_count'] gt 0">
                                            <if condition="$type eq 2 && $v['sk_count'] neq NULL">
                                                <div class="tit">第{$v['stage']}阶段</div>
                                            </if>
                                            <if condition="$type neq 2">
                                                <div class="tit">第{$v['stage']}阶段</div>
                                                <div class="border">
                                                    <table class="bg" border="0" cellspacing="0">
                                                        <tr>
                                                            <th>应开票金额</th>
                                                            <th>应开票日期</th>
                                                            <th>剩余应开票金额</th>
                                                        </tr>
                                                        <tr>
                                                            <td>{$v['ticket_money']+0}</td>
                                                            <td>{$v['ticket_date']}</td>
                                                            <td><if condition="$v['three'][0] neq null">{$v['three'][0]['syykp']}</if></td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </if>
                                            <if condition="$v['three'] neq NULL">
                                                <table class="nbg" border="0" cellspacing="0">
                                                    <tr>
                                                        <th width="27%"><span>发票编号</span></th>
                                                        <th width="28%">本次开票金额</th>
                                                        <th width="26%">本次开票日期</th>
                                                        <th width="19%">添加人</th>
                                                    </tr>
                                                    <foreach name="v['three']" item="d">
                                                        <tr>
                                                            <td><em>{$d['invoice']}</em></td>
                                                            <td>{$d['money']}</td>
                                                            <td>{$d['date']}</td>
                                                            <td>{$d['add_user']}<p>({$d['add_date']|substr=0,10})</p></td>
                                                        </tr>
                                                    </foreach>
                                                </table>
                                            </if>
                                        </if>
                                        <else />
                                        <if condition="$type eq 2 && $v['sk_count'] neq NULL">
                                            <div class="tit">第{$v['stage']}阶段</div>
                                        </if>
                                        <if condition="$type neq 2 && $v['three'] neq NULL">
                                            <div class="tit">第{$v['stage']}阶段</div>
                                            <div class="border">
                                                <table class="bg" border="0" cellspacing="0">
                                                    <tr>
                                                        <th>应开票金额</th>
                                                        <th>应开票日期</th>
                                                        <th>剩余应开票金额</th>
                                                    </tr>
                                                    <tr>
                                                        <td>{$v['ticket_money']+0}</td>
                                                        <td>{$v['ticket_date']}</td>
                                                        <td><if condition="$v['three'][0] neq null">{$v['three'][0]['syykp']}</if></td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </if>
                                        <if condition="$v['three'] neq NULL">
                                            <foreach name="v['three']" item="d">
                                                <table class="nbg" border="0" cellspacing="0">
                                                    <tr>
                                                        <th width="27%"><span>发票编号</span></th>
                                                        <th width="28%">本次开票金额</th>
                                                        <th width="26%">本次开票日期</th>
                                                        <th width="19%">添加人</th>
                                                    </tr>
                                                    <tr>
                                                        <td><em>{$d['invoice']}</em></td>
                                                        <td>{$d['money']}</td>
                                                        <td>{$d['date']}</td>
                                                        <td>{$d['add_user']}<p>({$d['add_date']|substr=0,10})</p></td>
                                                    </tr>
                                                </table>
                                                <if condition="$d['four'] neq NULL && $type neq 1">
                                                    <table class="nbg" border="0" cellspacing="0">
                                                        <tr>
                                                            <th width="27%">已收款金额</th>
                                                            <th width="28%">已收款日期</th>
                                                            <th width="26%">剩余应收款</th>
                                                            <th width="19%">添加人</th>
                                                        </tr>
                                                        <foreach name="d['four']" item="dd" key="kk">
                                                            <tr>
                                                                <td>{$dd['money']}</td>
                                                                <td>{$dd['date']}</td>
                                                                <td><if condition="$kk eq 0"><if condition="$dd['syysk'] eq NULL">0<else />{$dd['syysk']}</if></if></td>
                                                                <td>{$dd['add_user']}<p>({$dd['add_date']|substr=0,10})</p></td>
                                                            </tr>
                                                        </foreach>
                                                    </table>
                                                </if>
                                            </foreach>
                                        </if>
                                    </if>
                                </foreach>
                                <else />
                                <div style="color: #999;font-size: 14px;text-align: center;margin-top: -15px;">暂无相关内容</div>
                            </if>
                        </div>
                    </div>
                </div>
                <!--全部款项阶段-->
                <div class="box hidden">
                    <div class="finacial_det">
                        <div class="jd_list">
                            <foreach name="result['two']" item="vo">
                                <div class="tit">第{$vo['stage']}阶段<span>百分比：{$vo['bili']}</span></div>
                                <table>
                                    <tr>
                                        <td><p>应收款金额</p><span>{$vo['stage_money']}</span></td>
                                        <td><p>应开票金额</p><span>{$vo['ticket_money']}</span></td>
                                        <td><p>预警日期</p><span>{$vo['warn_date']}</span></td>
                                    </tr>
                                    <tr>
                                        <td><p>应收款日期</p><span>{$vo['stage_date']}</span></td>
                                        <td><p>应开票日期</p><span>{$vo['ticket_date']}</span></td>
                                        <td><p>催款日期</p><span>{$vo['press_date']}</span></td>
                                    </tr>
                                </table>
                            </foreach>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function(){
        $('.cut_menu_line a').each(function(i){
            $(this).click(function(){
                $(this).addClass('active').siblings().removeClass('active');
                $('.box').eq(i).fadeIn().siblings().hide();
            })
        })
        $('.box .right_text').each(function(){
            var ht = $(this).height();
            if(ht>22){
                $(this).addClass('active');
                $(this).parents('tr').find('.form_table_left').addClass('active');
            }
        })
		var size = $('.sub_btn').size();
		if(size>0){
			$('.meeting_cont').addClass('active')
		}
		if(size>2){
			$('.two').addClass('three')
		}
        
        $(window).scroll(function(){
            var top = $(window).scrollTop();
            if(top>$('.toptable').height()+8){
                $('.cut_menu_line').addClass('active');
            }else{
                $('.cut_menu_line').removeClass('active')
            }
        })
    })
</script>
</body>
</html>